package org.hobbyhorse.ranks.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.Widget;

public class StableMenu extends Composite {

	private static StableMenuUiBinder uiBinder = GWT
			.create(StableMenuUiBinder.class);
	@UiField Tree tree;
	@UiField Label lblHorses;
	@UiField Label lblRiders;
	@UiField Label lblCustomers;
	
	ClientFactory clientFactory;

	interface StableMenuUiBinder extends UiBinder<Widget, StableMenu> {
	}

	public StableMenu(ClientFactory clientFactory) {
		this.clientFactory=clientFactory;
		initWidget(uiBinder.createAndBindUi(this));
	}
	@UiHandler("lblHorses")
	void onLblHorsesClicked(ClickEvent event) {
		Window.alert("If this were implemented, you would be signed out now.");

		//		clientFactory.getPlaceController().goTo(new HorsesPlace());
	}
	@UiHandler("lblRiders")
	void onLblRidersClicked(ClickEvent event) {
		Window.alert("If this were implemented, you would be signed out now.");

//		clientFactory.getPlaceController().goTo(new RidersPlace());
	}
	@UiHandler("lblCustomers")
	void onLblCustomersClicked(ClickEvent event) {
		Window.alert("If this were implemented, you would be signed out now.");
	}

}
